package mysql

import "gorm.io/gorm"

type RealName struct {
	gorm.Model
	UserId    int    `gorm:"type:int(10);not null;comment:'用户Id'"`
	RealNames string `gorm:"type:varchar(5);not null;comment:'实名人员姓名'"`
	IdCard    string `gorm:"type:varchar(18);not null;comment:'实名人员身份证号'"`
}

func (r *RealName) Create(Real *RealName) error {
	return DB.Debug().Create(&Real).Error
}
func (r *RealName) GetRealName(id int) (result *RealName, err2 error) {
	DB.Debug().Where("id = ?", id).Limit(1).Find(&result)
	return
}
